home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / CMAcceleration.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  4.8 KB  |  133 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMAcceleration.a
  3. ;
  4. ;    Contains:    ColorSync 2.0 Acceleration Component Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CMACCELERATION__') = 'UNDEFINED' THEN
  21. __CMACCELERATION__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  25.     include 'Memory.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30.  
  31.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  32.     include 'Components.a'
  33.     ENDIF
  34.  
  35.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  36.     include 'CMApplication.a'
  37.     ENDIF
  38. ;        include 'Quickdraw.a'                                        ;
  39. ;            include 'QuickdrawText.a'                                ;
  40. ;        include 'Files.a'                                            ;
  41. ;            include 'OSUtils.a'                                    ;
  42. ;        include 'Printing.a'                                        ;
  43. ;            include 'Errors.a'                                        ;
  44. ;            include 'Dialogs.a'                                    ;
  45. ;                include 'Windows.a'                                ;
  46. ;                    include 'Events.a'                                ;
  47. ;                    include 'Controls.a'                            ;
  48. ;                        include 'Menus.a'                            ;
  49. ;                include 'TextEdit.a'                                ;
  50. ;        include 'CMICCProfile.a'                                    ;
  51.  
  52. cmAccelerationInterfaceVersion    EQU        1
  53.  
  54. ;–––––––––––––––––––––––––––––––––––––– Component Type
  55. cmAccelerationComponentType        EQU        'csac'
  56.  
  57. ;–––––––––––––––––––––––––––––––––––––– Required Component function selectors
  58. cmLoadTables                    EQU        0
  59. cmCalculateData                    EQU        1
  60.  
  61. ;–––––––––––––––––––––––––––––––––––––– table data for acceleration component
  62. CMAccelerationTableData RECORD    0
  63. inputLutEntryCount         ds.l   1        ; offset: $0 (0)        ; count of entries for input lut for one dimension
  64. inputLutWordSize         ds.l   1        ; offset: $4 (4)        ; count of bits of each entry ( e.g. 16 for WORD )
  65. inputLut                 ds.l   1        ; offset: $8 (8)        ; handle to input lut
  66. outputLutEntryCount         ds.l   1        ; offset: $C (12)        ; count of entries for output lut for one dimension    
  67. outputLutWordSize         ds.l   1        ; offset: $10 (16)        ; count of bits of each entry ( e.g. 8 for BYTE )
  68. outputLut                 ds.l   1        ; offset: $14 (20)        ; handle to output lut
  69. colorLutInDim             ds.l   1        ; offset: $18 (24)        ; input dimension  ( e.g. 3 for LAB ; 4 for CMYK )
  70. colorLutOutDim             ds.l   1        ; offset: $1C (28)        ; output dimension ( e.g. 3 for LAB ; 4 for CMYK )
  71. colorLutGridPoints         ds.l   1        ; offset: $20 (32)        ; count of gridpoints for color lut ( for one Dimension )    
  72. colorLutWordSize         ds.l   1        ; offset: $24 (36)        ; count of bits of each entry ( e.g. 8 for BYTE )
  73. colorLut                 ds.l   1        ; offset: $28 (40)        ; handle to color lut
  74. inputColorSpace             ds.l   1        ; offset: $2C (44)        ; packing info for input
  75. outputColorSpace         ds.l   1        ; offset: $30 (48)        ; packing info for output
  76. userData                 ds.l   1        ; offset: $34 (52)
  77. reserved1                 ds.l   1        ; offset: $38 (56)
  78. reserved2                 ds.l   1        ; offset: $3C (60)
  79. reserved3                 ds.l   1        ; offset: $40 (64)
  80. reserved4                 ds.l   1        ; offset: $44 (68)
  81. reserved5                 ds.l   1        ; offset: $48 (72)
  82. sizeof                     EQU *            ; size:   $4C (76)
  83.                         ENDR
  84.  
  85. ; typedef struct CMAccelerationTableData  CMAccelerationTableData, *CMAccelerationTableDataPtr, **CMAccelerationTableDataHdl
  86. ;–––––––––––––––––––––––––––––––––––––– calc data for acceleration component
  87. CMAccelerationCalcData     RECORD    0
  88. pixelCount                 ds.l   1        ; offset: $0 (0)        ; count of input pixels
  89. inputData                 ds.l   1        ; offset: $4 (4)        ; input array
  90. outputData                 ds.l   1        ; offset: $8 (8)        ; output array
  91. reserved1                 ds.l   1        ; offset: $C (12)
  92. reserved2                 ds.l   1        ; offset: $10 (16)
  93. sizeof                     EQU *            ; size:   $14 (20)
  94.                         ENDR
  95.  
  96. ; typedef struct CMAccelerationCalcData  CMAccelerationCalcData, *CMAccelerationCalcDataPtr, **CMAccelerationCalcDataHdl
  97. ;————————————————————————————————————————————————————————————————————————————————————————————————
  98. ;                A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  99. ;————————————————————————————————————————————————————————————————————————————————————————————————
  100. ;
  101. ; pascal CMError CMAccelerationLoadTables(ComponentInstance CMSession, CMAccelerationTableDataPtr tableData)
  102. ;
  103.     IF ¬ GENERATINGCFM THEN
  104.         Macro
  105.         _CMAccelerationLoadTables
  106.             dc.w     $2F3C
  107.             dc.w     $0004
  108.             dc.w     $0000
  109.             moveq    #0,d0
  110.             dc.w     $A82A
  111.         EndM
  112.     ELSE
  113.         IMPORT_CFM_FUNCTION    CMAccelerationLoadTables
  114.     ENDIF
  115.  
  116. ;
  117. ; pascal CMError CMAccelerationCalculateData(ComponentInstance CMSession, CMAccelerationCalcDataPtr calcData)
  118. ;
  119.     IF ¬ GENERATINGCFM THEN
  120.         Macro
  121.         _CMAccelerationCalculateData
  122.             dc.w     $2F3C
  123.             dc.w     $0004
  124.             dc.w     $0001
  125.             moveq    #0,d0
  126.             dc.w     $A82A
  127.         EndM
  128.     ELSE
  129.         IMPORT_CFM_FUNCTION    CMAccelerationCalculateData
  130.     ENDIF
  131.  
  132.     ENDIF ; __CMACCELERATION__
  133.